package com.molichuxing.services.business.dto.response;

import com.molichuxing.framework.dto.ResponseRootDto;
import com.molichuxing.services.property.GoodsPackageTypeEnum;
import com.molichuxing.services.property.GoodsPaymentTypeEnum;
import lombok.Data;

import java.math.BigDecimal;

/**
 * @create_date: 2019/4/3
 * @name:goods-service
 * @author xuelin yi
 **/
@Data
public class GoodsPackageBizDto extends ResponseRootDto {

    /**
     * 主键
     */
    private Integer id;

    /**
     * 商品id
     */
    private Integer goodsId;

    /**
     * 里程包类型(1:基础，2：订阅)
     */
    private Byte packageType;

    /**
     * 里程包类型
     */
    private String packageTypeStr;

    /**
     * 里程数
     */
    private Integer miles;

    /**
     * 里程价格
     */
    private BigDecimal milesPrice;

    /**
     * 赠送里程（0：不赠送）
     */
    private Integer giftMiles;

    public void setPackageType(Byte packageType) {
        this.packageType = packageType;
        this.packageTypeStr = GoodsPackageTypeEnum.getName(packageType);
    }
}
